<?php

namespace app\api\controller\v1;

use app\common\controller\BaseController;
use app\common\model\TopicClass as ModelTopicClass;
use app\common\validate\TopicClassValidate;

class TopicClass extends BaseController
{

     // 获取话题分类
    public function index()
    {
        $list = (new ModelTopicClass())->getTopicClassList();
        return $this->showResCode('获取成功',['list' => $list]);
    }
    // 获取话题分类下的话题列表
    public function topic()
    {
        (new TopicClassValidate())->goCheck();
        $list = (new ModelTopicClass())->getTopic();
        return $this->showResCode('获取成功',['list' => $list]);
    }
    
}
